<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Closes the file descriptor given by fd</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.dio-close" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">dio_close</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5 &lt; 5.1.0)</p><p class="refpurpose"><span class="refname">dio_close</span> &mdash; <span class="dc-title">Closes the file descriptor given by fd</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.dio-close-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>dio_close</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$fd</code></span>
   ) : <span class="type"><span class="type void">void</span></span></div>

  <p class="para rdfs-comment">
   The function <span class="function"><strong>dio_close()</strong></span> closes the file descriptor
   <code class="parameter">fd</code>.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.dio-close-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">fd</code></dt>

     <dd>

      <p class="para">
       The file descriptor returned by <span class="function"><a href="dio_open.html" class="function">dio_open()</a></span>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.dio-close-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.dio-close-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2741">
    <p><strong>Example #1 Closing an open file descriptor</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$fd&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">dio_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'/dev/ttyS0'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">O_RDWR</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">dio_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$fd</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.dio-close-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="dio_open.html" class="function" rel="rdfs-seeAlso">dio_open()</a> - Opens a file (creating it if necessary) at a lower level than the
   C library input/ouput stream functions allow</span></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>